<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>班级管理</title>
<script type="text/javascript">
	function del(id) {
		if(confirm("是否要删除这条记录？")){
			window.location="banji?method=delete&id="+id;
		}	
	}
	function add() {
		window.location="banji?method=add"
	}
	function update(id) {
		windw.lpcation="banji?method=update&id="+id;
	}
</script>
<style type="text/css">
	tble,th{
		border: 1px solid;
	}
	table{
		border-collapse: collapse;
		margin: auto;
	}
	td{
		width: 150px;
		height: 80px;
		text-align: center;
	}

}

</style>

</head>
<body>
<div class="aaa">
<h3>班级管理</h3>
<button onclick="add()">新增</button>
<table border="1">
	<tr> 	
		<th>序号</th>
		<th>班级名称</th>
		<th>班主任</th>
		<th colspan="2">操作</th>
	</tr>
	<c:forEach items="${list}" var="bj">
		<tr>
			<td>${bj.id }</td>
			<td>${bj.name }</td>
			<td>${bj.manager}</td>
			<td><button type="button" onclick="update(${bj.id})">修改</button></td>
			<td><button onclick="javascript:del(${bj.id})">删除</button></td>
		</tr>
</c:forEach>
</table>
</div>
</body>
<a href="login.jsp">返回登录页面</a>             
 <div style margin="10px"><a href="jsp/main.jsp" >返回首页</a></div>
</html>